package me.sealer.demo;

public class JavaVMStackOverFlowTest {
	private int stackLength = 1;

	public void stackLeak() {
		stackLength++;
		stackLeak();
	}
	
	public static void main(String[] args) {
		JavaVMStackOverFlowTest javaVMStackOverFlowTest = new JavaVMStackOverFlowTest();
		try {
			javaVMStackOverFlowTest.stackLeak();
		} catch (Throwable e) {
			System.out.println("stack length: " + javaVMStackOverFlowTest.stackLength);
			e.printStackTrace();
		}
	}
}
